/** 读卡回调 */
export interface IReadData {
  address: string | null;
  age: number;
  balance: number;
  birthTime: string;
  cardIdCode: string;
  cardNo: string | null;
  cardType: number;
  ecToken: string | null;
  hisCode: string | null;
  icCardNo: string;
  idCardNo: string;
  insuOrg: string;
  minZu: string | null;
  name: string;
  phone: string | null;
  sex: number;
  uid: string | null;
}

/** 回调格式 */
export interface IResult {
  code: number;
  data: IReadData;
  message: string;
}

/** 读身份证 */
export function idCardRead() {
  return readCard.readSfz<IResult>()
}

/** 读电子凭证 */
export function sinCardRead() {
  return readCard.readDzSbk<IResult>()
}

/** 读社保卡 */
export function ecRead() {
  
  return readCard.readSbk<IResult>()
}

/** scanBarcode */
export function scanBarcode(){
  return readCard.scanBarcode<IResult>()
}

/** 退卡 */
export function cardEject(){
  return readCard.exit()
}